<template>
	<view>
		<van-tabs type="card" class="headtabs">
			<van-tab title="我创建的" class="headtab">
				<createActive-list :list="rows"></createActive-list>
			</van-tab>
			<van-tab title="我要创建">
				<myCreateActive></myCreateActive>
			</van-tab>
		</van-tabs>
	</view>
</template>

<script>
	import createActive from '@/components/createActive-list/createActive-list.vue';
	import myCreateActive from '@/components/myCreateActive/myCreateActive.vue';
	import {
		allTeam,
	} from '@/api/createActive/createActive.js';
	export default {
		onShow() {
			this.selectLeader()
			
		},
		components: {
			createActive,
			myCreateActive
		},
		data() {
			return {
				rows: [],
			};
		},
		methods: {
			selectLeader() {
				allTeam().then( res => {
					console.log("Res",res);
					this.rows = res.data;
					console.log("rows",this.rows);
				})
			},
		},
	}
</script>

<style lang="scss">
	.headtabs {
		margin-top: 10px;
	}

	.headtab {
		margin-top: 10px;
	}
</style>
